package com.ruoyi.translat.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.translat.domain.ShortPlayCopyright;
import com.ruoyi.translat.mapper.ShortPlayCopyrightMapper;
import com.ruoyi.translat.service.IShortPlayCopyrightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 短剧版权链接Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-26
 */
@Service
public class ShortPlayCopyrightServiceImpl implements IShortPlayCopyrightService
{
    @Autowired
    private ShortPlayCopyrightMapper shortPlayCopyrightMapper;

    /**
     * 查询短剧版权链接
     * 
     * @param id 短剧版权链接主键
     * @return 短剧版权链接
     */
    @Override
    public ShortPlayCopyright selectShortPlayCopyrightById(Long id)
    {
        return shortPlayCopyrightMapper.selectShortPlayCopyrightById(id);
    }

    /**
     * 查询短剧版权链接列表
     * 
     * @param shortPlayCopyright 短剧版权链接
     * @return 短剧版权链接
     */
    @Override
    public List<ShortPlayCopyright> selectShortPlayCopyrightList(ShortPlayCopyright shortPlayCopyright)
    {
        return shortPlayCopyrightMapper.selectShortPlayCopyrightList(shortPlayCopyright);
    }

    /**
     * 新增短剧版权链接
     * 
     * @param shortPlayCopyright 短剧版权链接
     * @return 结果
     */
    @Override
    public int insertShortPlayCopyright(ShortPlayCopyright shortPlayCopyright)
    {
        shortPlayCopyright.setCreateTime(DateUtils.getNowDate());
        return shortPlayCopyrightMapper.insertShortPlayCopyright(shortPlayCopyright);
    }

    /**
     * 修改短剧版权链接
     * 
     * @param shortPlayCopyright 短剧版权链接
     * @return 结果
     */
    @Override
    public int updateShortPlayCopyright(ShortPlayCopyright shortPlayCopyright)
    {
        return shortPlayCopyrightMapper.updateShortPlayCopyright(shortPlayCopyright);
    }

    /**
     * 批量删除短剧版权链接
     * 
     * @param ids 需要删除的短剧版权链接主键
     * @return 结果
     */
    @Override
    public int deleteShortPlayCopyrightByIds(Long[] ids)
    {
        return shortPlayCopyrightMapper.deleteShortPlayCopyrightByIds(ids);
    }

    /**
     * 删除短剧版权链接信息
     * 
     * @param id 短剧版权链接主键
     * @return 结果
     */
    @Override
    public int deleteShortPlayCopyrightById(Long id)
    {
        return shortPlayCopyrightMapper.deleteShortPlayCopyrightById(id);
    }
}
